package com.wenli.graduate2022.wenliGreenShop.service.servDao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wenli.graduate2022.wenliGreenShop.entity.Product;

import java.util.List;

/**
 * @author HuangHai
 * @date 2021/10/6 16:03
 */
public interface ProductService {
    List<Product> findAll();
    IPage<Product> findByPage(Page page);
    Product findById(Integer id);
    int insert(Product product);
    int update(Product product);
    int delete(Integer id);
    IPage<Product> findByName(Page page,String name);
    int selectLastInsertId();
    List<Product> findProductsByCategory(String category);
    List<Product> findProductsByCategoryId(Integer id);



}
